package goodenglish;

/**
 * Copyright (c) 2008, 2011 Oracle and/or its affiliates.
 * All rights reserved. Use is subject to license terms.
 */
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.ContentDisplay;
import javafx.scene.control.Label;
import javafx.scene.image.Image;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

/**
 * An example of a StackPane layout.
 *
 * @see javafx.scene.layout.FlowPane
 * @related controls/text/SimpleLabel
 * @related graphics/images/ImageCreationSample
 * @resource icon-48x48.png
 */
public class StackPaneSample extends Application {
    private static final Image ICON_48 = new Image(StackPaneSample.class.getResourceAsStream("icon-48x48.png"));
    private void init(Stage primaryStage) {
        Group root = new Group();
        primaryStage.setScene(new Scene(root));
 
        StackPane stackPane = new StackPane();

        Label label = new Label("Your name could be here.");
        Label labe2 = new Label("ssssssssssssssssssss");
        label.setContentDisplay(ContentDisplay.RIGHT);
        labe2.setContentDisplay(ContentDisplay.RIGHT);

        stackPane.getChildren().addAll(labe2, label);

        root.getChildren().add(stackPane);
    }

    @Override public void start(Stage primaryStage) throws Exception {
        init(primaryStage);
        primaryStage.show();
    }
    public static void main(String[] args) { launch(args); }
}
